package gui;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import constantes.ICTE;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class PantallaCliente extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JButton BTconectar;
	private JLabel labelServer;
	private JLabel labelNombre;
	private JTextField fieldIp;
	private JTextField FieldNombre;
	private MainGui main = null;

	
	public PantallaCliente(MainGui gui) {
		super();
		main = gui;
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
			this.setPreferredSize(new java.awt.Dimension(340, 275));
			this.setLocation(new java.awt.Point(200, 200));
			this.setResizable(false);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.CENTER);
				jPanel1.setLayout(null);
				{
					FieldNombre = new JTextField();
					jPanel1.add(FieldNombre);
					FieldNombre.setText("Player1");
					FieldNombre.setBounds(152, 59, 128, 22);
				}
				{
					fieldIp = new JTextField();
					jPanel1.add(fieldIp);
					fieldIp.setText("xxx.xxx.x.x");
					fieldIp.setBounds(152, 100, 128, 22);
				}
				{
					labelNombre = new JLabel();
					jPanel1.add(labelNombre);
					labelNombre.setText("Nick");
					labelNombre.setBounds(68, 62, 51, 15);
				}
				{
					labelServer = new JLabel();
					jPanel1.add(labelServer);
					labelServer.setText("Server IP");
					labelServer.setBounds(68, 103, 66, 15);
				}
				{
					BTconectar = new JButton();
					jPanel1.add(BTconectar);
					BTconectar.setText("Conectar");
					BTconectar.setBounds(123, 172, 96, 22);
					BTconectar.addMouseListener(new MouseAdapter() {
						public void mouseClicked(MouseEvent e) {
							System.out.println("Clickeo en conectar..");
							
						}
					});
				}
			}
			pack();
			this.setSize(340, 275);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
